package com.ysstech.etfmanage.controller;


import com.ysstech.common.annotation.YssLog;
import com.ysstech.common.annotation.YssPermissions;
import com.ysstech.common.controller.BaseController;
import com.ysstech.common.util.resultutil.RestResult;
import com.ysstech.common.util.resultutil.ResultGenerator;
import com.ysstech.etfmanage.entity.SettlementDetailed;
import com.ysstech.etfmanage.service.SettlementDetailedService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.ResponseBody;

/**
 * <p>
 * ETF结算明细信息 前端控制器
 * </p>
 *
 * @author lishuangliang
 * @since 2021-07-07
 */
@Controller
@Slf4j
@Api(tags = "ETF结算明细api")
@RequestMapping("/settlementDetailed")
public class SettlementDetailedController extends BaseController {
    @Autowired
    private SettlementDetailedService settlementDetailedService;

    /**
     * 查询ETF结算明细列表信息
     *
     * @return
     */
    @YssPermissions(value = {"etfmanage:dealDetaild"})
    @ApiOperation(value = "获取ETF结算明细数据")
    @YssLog(module = "ETF结算明细管理", remark = "获取ETF结算明细数据")
    @PostMapping(value = "/listInfo")
    @ResponseBody
    public RestResult queryAccount(SettlementDetailed settlementDetailed, String page, String rows) throws Exception {
        return ResultGenerator.getSuccessResult("获取ETF结算明细数据成功",
                settlementDetailedService.queryAllEtfSettlementDetailed(settlementDetailed, this.getPage(page, rows)));
    }
}
